package bizresponse

var (
	Success = NewCodeErrorWithInit(
		200,
		"成功",
		"ok",
		"ok")
	ErrUnknown = NewCodeErrorWithInit(
		5001001,
		"系统繁忙，请稍候再试",
		"The system is busy. Please try again later",
		"Sistem sedang sibuk. Coba lagi nanti")
	ErrInvalidArgs = NewCodeErrorWithInit(
		5001002,
		"参数错误，换个姿势再来一次吧",
		"Wrong parameters. Let's try again in a different way",
		"Parameter salah. Mari kita coba lagi dengan cara yang berbeda")
	ErrInternalFailed = NewCodeErrorWithInit(
		5001003,
		"网络繁忙，请稍后重试",
		"The network is busy, please try again later",
		"Jaringan sedang sibuk, silakan coba lagi nanti")
	ErrClientCancel = NewCodeErrorWithInit(
		5001004,
		"服务连接断开了, 请稍后重试",
		"The service connection is down, please try again later",
		"Sambungan layanan terputus, coba lagi nanti")
	ErrDeadlineExceed = NewCodeErrorWithInit(
		5001005,
		"服务器繁忙，请稍候重试",
		"The server is busy. Please try again later",
		"Server sedang sibuk. Coba lagi nanti")
	ErrRequestOutOfTime = NewCodeErrorWithInit(
		5001006,
		"访问已过期，请重试",
		"Access expired, please try again",
		"Akses kedaluwarsa, harap coba lagi")
	ErrSignFailed = NewCodeErrorWithInit(
		5001007,
		"签名验证失败",
		"Signature verification failure",
		"Kegagalan verifikasi tanda tangan")
	ErrNoPermission = NewCodeErrorWithInit(
		5001008,
		"没有权限执行该操作",
		"Do not have permission to perform this operation",
		"Tidak memiliki izin untuk melakukan operasi ini")
	ErrFunctionClose = NewCodeErrorWithInit(
		5001009,
		"该功能已关闭",
		"This feature is turned off",
		"Fitur ini dimatikan")
)

var (
	pool = make(map[string]*CodeError)
)

/*
各服务错误码请按照以下定义的区段进行定义：
5001*** -> System
5002*** -> User
*/
